package cz.semjob.linguistic.reader.attribute.czech;

import org.springframework.stereotype.Component;

import cz.semjob.linguistic.reader.attribute.AGenderAttribute;

@Component
public class CzechGenderAttribute extends AGenderAttribute {
	
	public static final String FEMININE = "FEMININE";
	public static final String FEMININE_NEUTER = "FEMININE_NEUTER";
	public static final String MASCULINE_INANIMATE = "MASCULINE_INANIMATE";
	public static final String MASCULINE_ANIMATE = "MASCULINE_ANIMATE";
	public static final String NEUTER = "NEUTER";
	//Feminine (with singular only) or Neuter (with plural only); used only with participles
	//and nominal forms of adjectives
	public static final String FEMININE_NEUTER_PART_ADJ = "FEMININE_NEUTER_PART_PRO"; 
	//Masculine inanimate or Feminine (plural only); used only with participles and nominal
	//forms of adjectives
	public static final String MASC_IN_OR_FEM = "MASC_IN_OR_FEM"; 
	public static final String ANY = "ANY";
	public static final String MASCULINE = "MASCULINE";
	public static final String NOT_FEMININE = "NOT_FEMININE";
	public static final String NONE = "NONE";
	
	public static final String[] values = new String[]{FEMININE, FEMININE_NEUTER, MASCULINE_ANIMATE, MASCULINE_INANIMATE, NEUTER, FEMININE_NEUTER_PART_ADJ,
		MASC_IN_OR_FEM, ANY, MASCULINE, NOT_FEMININE, NONE};


	public String[] getValues() {
		return values;
	}

	public String getValue(String input) {
		if (input.equals("F")) {
			return FEMININE;
		} else if (input.equals("H")) {
			return FEMININE_NEUTER;
		} else if (input.equals("I")) {
			return MASCULINE_INANIMATE;
		} else if (input.equals("M")) {
			return MASCULINE_ANIMATE;
		} else if (input.equals("N")) {
			return NEUTER;
		} else if (input.equals("Q")) {
			return FEMININE_NEUTER_PART_ADJ;
		} else if (input.equals("T")) {
			return MASC_IN_OR_FEM;
		} else if (input.equals("X")) {
			return ANY;
		} else if (input.equals("Y")) {
			return MASCULINE;
		} else if (input.equals("Z")) {
			return NOT_FEMININE;
		} else if (input.equals("-")){
			return NONE;
		} else {
			return null;
		}
	}

}
